package com.github.base.mapper;

import com.github.base.domain.Role;
import com.github.base.vo.role.RolePageListVO;
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Repository
@InterceptorIgnore(illegalSql = "true")
public interface RoleMapper extends BaseMapper<Role> {
    Page<RolePageListVO> pageList (Page<?> page, @Param("roleName") String roleName,
                                   @Param("usable") Integer usable, @Param("roleDesc") String roleDesc);

    Integer selectUserCountByRole(@Param("roleId") Long roleId);
}
